<template>
	<div id='CourseClassicalList'>
		<div class="course_calssical_list" v-for="item,index in dataList">
			<div @click="courseClick(item)" class="course_calssical_list_top" :class="type=='study'?'study_calssical_list_top':''">
				<img class="list_img" :src="type=='study'?(item.ctitle_img_mini||item.ctitle_img):item.title_img_mini" alt="" />
				<div class="list_right">
					<div class="list_title c_text_ellipsis_2 c_size_34_48">{{type=='study'?item.ctitle:item.title}}</div>
					<div class="list_label">
						<div class="list_label_left">
							<div>共{{item.video_count}}节</div>
							<span v-if="type=='study'"></span>
							<div v-if="type=='study'">已学{{item.learn_count}}节</div>
						</div>
						<span>{{item.watch_count}}次学习</span>
					</div>
				</div>
			</div>
			<div class="course_calssical_list_bottom" v-if="type=='study'" @click="goCourseDetail(item)">
				<div class="old_study c_text_ellipsis_1">上次学习：{{item.title}}</div>
				<div class="study_btn" >继续学习</div>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		name: 'CourseClassicalList',
		props: {
			dataList: {
				default:function(){
					return []
				},
			},
			type: {
				default:'course'
			}
		},
		components: {

		},
		data() {
			return {

			}
		},
		created() {},
		watch: {

		},
		computed: {

		},
		mounted() {
			
		},
		methods: {
			courseClick(item){
				this.$emit('courseClick',item)
			},
			goCourseDetail(item){
				this.$router.push({
					name:'courseVideoDetailVip',//courseAudioDetail courseDetail courseVideoDetailVip
					query:{
						id:item.id
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	@import './CourseClassicalList.scss';
</style>